<?php
require_once "config.php";
$id=$_GET['id'];
$sql = "delete from category where id = $id";
$rst = mysqli_query($con,$sql);
$num = mysqli_affected_rows($con);
if($num > 0){
    echo "<script>alert('删除成功!');window.location.href='cate_list.php';</script>";
}else{
    echo "<script>alert('删除失败!');window.location.href='cate_list.php';</script>";
}